package cn.stylefeng.guns.modular.gridsystem.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.modular.gridsystem.entity.BizCollectionSampleManage;
import cn.stylefeng.guns.modular.gridsystem.model.param.BizCollectionSampleManageParam;
import cn.stylefeng.guns.modular.gridsystem.model.result.BizCollectionSampleManageResult;
import cn.stylefeng.guns.modular.gridsystem.model.result.CollectionResponseResult;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 通道类型 服务类
 *
 * @author ssy
 * @date 2022/02/16 10:59
 */
public interface BizCollectionSampleManageService extends IService<BizCollectionSampleManage> {

    /**
     * 分页查询采集端样本管理
     *
     * @param param 分页查询入参
     *              gatewayId      网关id
     *              gatewayCode    网关code
     *              gatewayChannel 网关通道
     *              gatewayIds     网关ids
     * @return PageResult<BizCollectionSampleManageResult> 网关样本返回
     */
    PageResult<BizCollectionSampleManageResult> page(BizCollectionSampleManageParam param);

    /**
     * 分页查询采集端网关通道样本
     *
     * @param param 分页查询入参
     *              gatewayId      网关id
     *              gatewayChannel 网关通道
     * @return PageResult<BizCollectionSampleManageResult> 网关样本返回
     */
    PageResult<BizCollectionSampleManageResult> pageList(BizCollectionSampleManageParam param);

    /**
     * 新增采集端样本
     *
     * @param bizCollectionSampleManageParam 新增采集端样本入参
     *                                       gatewayId          网关id
     *                                       gatewayCode        网关编号
     *                                       gatewayChannel     网关通道
     *                                       expectAccessToken  期望ID编号
     *                                       expectGroupId      期望分组号
     *                                       fileId             文件
     */
    void add(BizCollectionSampleManageParam bizCollectionSampleManageParam);

    /**
     * 根据id删除采集端样本 并下发删除模型任务
     *
     * @param bizChannelTypeParam 删除入参
     *                            id      主键id
     */
    void delete(BizCollectionSampleManageParam bizChannelTypeParam);

    /**
     * 修改采集端样本信息
     *
     * @param bizCollectionSampleManageParam 修改日志信息入参
     *                                       id            主键id
     *                                       code          通道类型编码
     *                                       name          类型名称
     *                                       fileName      图片
     *                                       remark        备注
     *                                       model         型号
     */
    void edit(BizCollectionSampleManageParam bizCollectionSampleManageParam);

    /**
     * 查看注册模型详情
     *
     * @param bizCollectionSampleManageParam 查询入参
     *                                       id      主键id
     * @return BizCollectionSampleManageResult
     */
    BizCollectionSampleManageResult detail(BizCollectionSampleManageParam bizCollectionSampleManageParam);

    /**
     * 注册故障模型
     *
     * @param param 注册故障模型入参
     *              gatewayId       网关id
     *              fileIds         文件id
     *              faultName       异常名称
     *              failureLevel    一场等级
     * @return Long
     */
    Long registerModel(BizCollectionSampleManageParam param);

    /**
     * 注册正样本模型
     *
     * @param param 注册正样本模型入参
     *              channel
     *              gatewayId
     *              fileIds
     * @return Long
     */
    Long registerNormalModel(BizCollectionSampleManageParam param);

    /**
     * 根据网关和任务Id查询远程任务响应
     *
     * @param param 查询入参
     *              gatewayId   网关ID
     *              taskId      任务ID
     * @return CollectionResponseResult
     */
    CollectionResponseResult queryTask(BizCollectionSampleManageParam param);

}
